#ifndef ERROR_CODES_H
#define ERROR_CODES_H

#include "Common.h"

// Add strings to error_strings in ErrorCodes.cpp when new error codes are created
enum{
	ERR_NONE = 0,
	
	/* Assert/Confirm/Require errors */
	ERR_ASSERT_FAILED,
	ERR_CONFIRM_FAILED,
	ERR_REQUIRE_FAILED,

	/* Object Message Error Codes */
	ERR_INVALID_NUM_ARGS,
	ERR_INVALID_ARG_TYPES,
	ERR_SETTING_SLOT_OF_TRUE_FALSE_NONE,
	ERR_KEY_MISSING,
	ERR_INVALID_DATATYPE,
	ERR_INVALID_DELTA_FILL,
	ERR_ILLEGAL_RECURSION,

	/* Object Error Codes */
	ERR_OBJ_CANNOT_COPYOF,
	ERR_OBJ_CANNOT_USE_SLOTS,
	ERR_OBJ_CANNOT_CLONE,
	ERR_OBJ_CANNOT_TONUMBER,

	/* Assembler Failure Codes */
	ERR_DUPLICATE_LABEL,
	ERR_INVALID_MESSAGE_PASSED,
	ERR_JUMPS_MISSING_LABEL,

	/* Lexer Errors */
	ERR_TOKEN_MATCHED_NO_RULES,
	
	/* Fle IO Errors */
	ERR_FILE_OPEN_FAILED,
	ERR_FILE_READ,
	ERR_FILE_WRITE,
	ERR_FILE_INVALID_MODE,
	
	/* System Errors */
	ERR_FILE_LOAD,
	
	/* Event Errors */
	ERR_EVENT_INVALID_ATTACHMENT,
	ERR_EVENT_NO_RECEIVE,
	ERR_EVENT_DEST_DOES_NOT_EXIST,
	ERR_EVENT_NOT_ALLOWED,

	// must be last
	NUM_ERROR_CODES
};

const char *ErrorString(uint errorCode);

#endif
